﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data;

namespace Wicresoft.EKA.BOSync
{
    public interface IDB
    {
        string ConnectionString { get; set; }

        void ExecuteStoredProcedure(string spName);

        void ExecuteStoredProcedure(string spName, DbParameter[] prams);

        void ExecuteNonQuery(string sql);

        IDataReader ExecuteReader(string sql, params DbParameter[] prams);

        string ExecuteScalar(string sql);

        string ExecuteScalar(string sql, DbParameter[] prams);

        void ExecuteNonQuery(string sql, DbParameter[] prams, int? commandTimeout = null);

        void ExecuteNonQuery(string sql, List<DbParameter[]> pramss, int? commandTimeout = null);

        DataSet ExecuteDataSet(string sql);

        DataTable ExecuteDataTable(string sql);

        DataTable ExecuteDataTable(string sql, params DbParameter[] prams);

        void BulkInsert<T>(IList<T> list);
    }
}
